package com.meilele.dao.czh;

import com.meilele.entity.czh.FiveGuest;
import org.apache.ibatis.annotations.*;

public interface FiveGuestMapper {
    @Delete({
        "delete from five_guest",
        "where guest_id = #{guestId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer guestId);

    @Insert({
        "insert into five_guest (guest_id, guest_name, ",
        "post_id, commentaries_id, ",
        "revert_id)",
        "values (#{guestId,jdbcType=INTEGER}, #{guestName,jdbcType=VARCHAR}, ",
        "#{postId,jdbcType=INTEGER}, #{commentariesId,jdbcType=INTEGER}, ",
        "#{revertId,jdbcType=INTEGER})"
    })
    int insert(FiveGuest record);

    int insertSelective(FiveGuest record);

    @Select({
        "select",
        "guest_id, guest_name, post_id, commentaries_id, revert_id",
        "from five_guest",
        "where guest_id = #{guestId,jdbcType=INTEGER}"
    })
    @ResultMap("com.meilele.dao.czh.FiveGuestMapper.BaseResultMap")
    FiveGuest selectByPrimaryKey(Integer guestId);

    int updateByPrimaryKeySelective(FiveGuest record);

    @Update({
        "update five_guest",
        "set guest_name = #{guestName,jdbcType=VARCHAR},",
          "post_id = #{postId,jdbcType=INTEGER},",
          "commentaries_id = #{commentariesId,jdbcType=INTEGER},",
          "revert_id = #{revertId,jdbcType=INTEGER}",
        "where guest_id = #{guestId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(FiveGuest record);
}